package common.quickvalid.validators;

import java.text.ParseException;
import java.util.Map;


/**
 * 身份证验证
 * @see IdcardValidator
 * @author beansoft
 *
 */
public class validate_id extends BaseValidator {

	public String doValidation(String fieldName, String fieldDescription,
	        Map<String, Object> params, String... args) {
		super.setParams(params);		
		String value = getValue(fieldName);
		
		if(value != null && value.length() > 0) {
			if(!new IdcardValidator().isValidatedAllIdcard(value)) {
				return fieldDescription + "的输入值不是合法的身份证号码";
			}

		}
		return null;
	}

}